package com.lz.entity;


import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.*;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
import lombok.Data;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

/**
 * 汽车类
 *
 * @author 周浩宇
 * @date
 */
@Table
@Entity
@Data
public class Car implements Serializable {
    /**
	 * 
	 */
	private static final long serialVersionUID = 7817316106486220957L;
	@Id
    @GeneratedValue(strategy=GenerationType.AUTO)
    private Integer carId;
    // 汽车品牌
    private String brand;
    /**汽车牌照*/
    private String carCard;
    //车系
    private String series;
    //车型
    private String model;
    //配置
    private String configure;
    //颜色
    private String color;
    //价格
    private Double price;
    //VIN
    private String vin;


    /*@NotFound(action=NotFoundAction.IGNORE)
    @ManyToOne(targetEntity=Customer.class,fetch = FetchType.LAZY,optional = false)
    @JoinColumn(name="carSet")
    private Customer customer;*/
    @ManyToOne(targetEntity=Customer.class)
    @JoinColumn(name="customerId")
    private Customer customer;
}
